#!/bin/bash

NCL_SCRIPT_PATH="$HOME/Codes/WRF_scripts/WRF_Post/"
wrfpost_dir="$HOME/wrfpost"
allvalue_dir_prefix="$wrfpost_dir/txt/station_allvalue"
cd $NCL_SCRIPT_PATH

START_DATE="2012-12-14"
for i in `seq 0 4`
do
    date=`date -d "$START_DATE +$i day" "+%Y%m%d"`
    year=`echo $date | cut -c1-4`
    month=`echo $date | cut -c5-6`
    day=`echo $date | cut -c7-8`
    for domain in "d01" "d02"
    do
        ncl input_file='"'$HOME/wrfout/${date}08/wrfout_${domain}_${year}-${month}-${day}"_00:00:00"'"' output_prefix='"'${allvalue_dir_prefix}/$domain'"' wrfout_to_station_allvalue.ncl
        ncl input_file='"'$HOME/wrfout/${date}20/wrfout_${domain}_${year}-${month}-${day}"_12:00:00"'"' output_prefix='"'${allvalue_dir_prefix}/$domain'"' wrfout_to_station_allvalue.ncl
    done
done

